-- GENERATED SPELL FOR [Twilight Darkcaster] --


function spell0_30319(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(56898,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30319', 26000, 1)
end

function spell1_30319(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(61563,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30319', 12000, 1)
end

function spell2_30319(pUnit, Event) --@Curse of Tongues,n/a--
pUnit:FullCastSpellOnTarget(13338,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30319', 15294, 1)
end

function spell3_30319(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(61562,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30319', 1500, 1)
end

function spell4_30319(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30319', 3000, 1)
end

function Sorts_30319(pUnit, Event)
local choix_sorts_30319 = math.random(0, 4)
if choix_sorts_30319 == 0 then
pUnit:RegisterEvent('spell0_30319', 1, 1)
end
if choix_sorts_30319 == 1 then
pUnit:RegisterEvent('spell1_30319', 1, 1)
end
if choix_sorts_30319 == 2 then
pUnit:RegisterEvent('spell2_30319', 1, 1)
end
if choix_sorts_30319 == 3 then
pUnit:RegisterEvent('spell3_30319', 1, 1)
end
if choix_sorts_30319 == 4 then
pUnit:RegisterEvent('spell4_30319', 1, 1)
end
end

function mob30319_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30319', math.random(1500, 3000), 1)
end

function mob30319_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30319_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30319_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30319, 1, 'mob30319_Action')
RegisterUnitEvent(30319, 2, 'mob30319_Leave')
RegisterUnitEvent(30319, 3, 'mob30319_Kill')
RegisterUnitEvent(30319, 4, 'mob30319_Die')
